import vnode from "./vnode.js";
export default function(sel, data, c) {
  if (arguments.length !== 3) {
    throw new Error("必须三个参数！！");
  }
  if (typeof c === "string" || typeof c === "number") {
    return vnode(sel, data, undefined, c, undefined);
  } else if (Array.isArray(c)) {
    var children = [];
    for (let index = 0; index < c.length; index++) {
      children.push(c[index]);
    }
    return vnode(sel, data, children, undefined, undefined);
  }
}
